package com.day09.test;


// final关键字可以修饰类，类的成员，局部变量，参数。
// final修饰类：类不能被继承，final修饰属性：属性就变成了常量。常量必须在声明的同时赋值，且这个值将不再改变
// final修饰局部变量：变量变成常量。final修饰方法：方法不能被重写。
// final修饰参数：参数的值在方法内部只能被使用，不能被修改。
public class Student {
    private String stuName;
    private int stuAge;
    private final String stuGender = "男";

    public Student() {
    }

    public Student(String stuName, int stuAge, String stuGender) {
        this.stuName = stuName;
        this.stuAge = stuAge;
        // this.stuGender = stuGender;
    }

    public String getStuName() {
        return stuName;
    }

    public void setStuName(final String stuName) {
        // stuName = "Tom";
        this.stuName = stuName;
    }

    public int getStuAge() {
        return stuAge;
    }

    public void setStuAge(int stuAge) {
        this.stuAge = stuAge;
    }

    public String getStuGender() {
        return stuGender;
    }

    public void setStuGender(String stuGender) {
        // this.stuGender = stuGender;
    }
}
